
<?php 

class General_auth
{
	
	function __construct()
	{
		$this->CI =& get_instance();
		$this->CI->load->database();
		
	}
	/**
	 * [check_validity 检查用户有效性避免URL乱访问]
	 * @return [type] [非有效性则返回登录页面]
	 */
	function check_validity()
	{
        if (!isset($_SESSION["username"])) {
        	redirect('admin/login');
			exit;	
        }
	}


}







